package net.adetech.code;

import net.adetech.code.service.IGenerateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.Banner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

/**
 * Created by sunfeihu on 2017/4/17.
 */
@SpringBootApplication
@ComponentScan(basePackages = {"net.adetech.**"})
public class Application implements CommandLineRunner {

    @Autowired
    private IGenerateService iGenerateService;

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(Application.class);
        app.setBannerMode(Banner.Mode.OFF);
        app.run(args);
    }

    @Override
    public void run(String... strings) throws Exception {
        iGenerateService.all(new String[]{"dc_info"});
        System.exit(0);
    }

}
